package com.sun.umbrella.service.shiro;

/**
 * @author Jay
 * @version v1.0
 * @description 常量池
 * @date 2017-11-18 22:54
 */
public final class Constants {


    /**
     * 当前用户
     */
    public static final String CURRENT_USER = "user";


    /**
     * 错误描述
     */
    public static final String INVALID_CLIENT_DESCRIPTION = "检查传入的客户端id是否正确";

    /**
     * get请求
     */
    public static final String GET = "get";

    /**
     * redis的sessionId的key
     */
    public static final String SESSION_ID_KEY = "umbrella:str:session:SESSION_ID_KEY:";


    /**
     * redis的sessionHost的key
     */
    public static final String SESSION_HOST_KEY = "umbrella:str:session:SESSION_HOST_KEY:";


    /**
     * 存储每个系统对应的过滤器的配置
     */
    public static final String SYS_FILTER_CHAIN_KEY = "umbrella:str:filter:FILTER_CHAIN_KEY:";


    /**
     * 每个系统对应的过滤器是否需要重新加载的redis的key
     */
    public static final String SYS_FILTER_REOAD = "umbrella:str:reloadFilter:RELOAD_FILTER_KEY:";


    /**
     * 获取 每个系统对应的过滤器是否需要重新加载的redis的key
     *
     * @param sysId
     * @return
     */
    public static final String getSysFilterReoad(Integer sysId) {
        return SYS_FILTER_REOAD + sysId;
    }

    /**
     * 获取sysId对应的redis的key
     *
     * @param sysId
     * @return
     */
    public static final String getSysFilterChainKey(Integer sysId){
        return SYS_FILTER_CHAIN_KEY + sysId;
    }
}
